<!DOCTYPE html>
<html><head>
<title>HTML KickStart</title>
<meta charset="UTF-8">
<meta name="description" content="" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="js/prettify.js"></script>                                   <!-- PRETTIFY -->
<script type="text/javascript" src="js/kickstart.js"></script>                                  <!-- KICKSTART -->
<link rel="stylesheet" type="text/css" href="css/kickstart.css" media="all" />                  <!-- KICKSTART -->
<link rel="stylesheet" type="text/css" href="style.css" media="all" />                          <!-- CUSTOM STYLES -->
</head><body><a id="top-of-page"></a><div id="wrap" class="clearfix">
<!-- ===================================== END HEADER ===================================== -->


	
	<div class="col_12">
		
		<h1>Новости этой страны</h1>

		

		<!-- Menu Horizontal -->
		<ul class="menu">
			
				<li <?php 
					   if ($_GET['id'] == null) 
							{ ?>  
							 class="current" 
					  <?php }?> 
					>
					<a href=".">Главная
					</a>
				</li>
			
			<?php 	
			If ($menu != null)
			{
				foreach ($menu as $line) 
					{	?>
						<li <?php 
								  if ($_GET['id'] == $line['id']) 
									{ ?> 
									   class="current" 
							  <?php }  ?> >
							<a href="?id=<?php echo $line['id']; ?>">
								<?php echo $line['title'] ?>
							</a>
						</li>
			 <?php  } 
			}?>
		</ul>


	</div>
	
	
	 
	<?php 	
	 If ($result != null)
	    {
		   foreach ($result as $line)
			    { ?>
				    <div class="col_12">
					   <h4><?php echo $line['title'];?> </h4>
					   <em><?php echo $line['added_date']; ?></em>
						<p>
						   <img class="align-left" src="http://placehold.it/100x100/4D99E0/ffffff.png&text=100x100" width="100" height="100" />
						   <?php echo $line[story_short];?>
						   <?php if ($novost != null)  echo "<br>{$line[story_full]}";?>
						   <?php if ($novost == null) 
									{ ?>  <a href="<?php echo "{$v}news=",$line['id'];?>">Read more</a> 
							  <?php } ?>
						</p>
				    </div>
		
	   
		  <?php } 
		  
		} else  { ?>
		         <div class="col_12"><h4>Новостей нет.<h4></div>;
		  <?php } ?>
	
	
	

  <?php if ($novost == null) 
		{ ?>
			<div  class="col_12"?>
				<ul class="button-bar">
						
					<?php global $PagesOnSite;  
						  if ($from >=$PagesOnSite) 
						    { ?> 	
							  <li><a href="<?php echo $v;?>page=<?php echo $from-1;?>">prev <?php echo $PagesOnSite; ?> ...</a></li> 
					  <?php } ?>
					 
					 <?php  for($i=$from; $i<=$to; $i++)
						{ ?>
							<li <?php if($_GET['page'] == $i) 
									   { ?> class="current-bar" 
								 <?php } else if ($i==1 && $_GET['page'] == null ) 
												{?> class="current-bar" <?php }  ?>>
												<a href="<?php echo $v;?>page=<?php echo $i;?>"><?php echo $i;?></a></li>
				  <?php } ?>
					 <?php  if ($to < $stranic) 
						        { ?> 	
								  <li><a href="<?php echo $v;?>page=<?php echo $i;?>">next <?php echo $PagesOnSite; ?> ...</a></li> 
						  <?php } ?>
				</ul>
			</div>
  <?php }  ?>
<!-- ===================================== START FOOTER ===================================== -->
</div>
</div><!-- END WRAP -->
</body></html>